
<?php	
	
	class testimonial extends database
	{
		var $connection = '';	

		function testimonial()
		{
			parent::database();
		}
	
		function GetListPaging()
		{						
			$this->setQuery("set names utf8");
			$this->query();
			return $sql = "Select * from vnf_testimonial";			
			//return $pager;
			//$rs = $pager->paginate();
	//Loop through the result set
				
			/*$this->setQuery($sql);
			$value = $this->loadAllRow();
			return $value;*/
		}
		
		function GetList()
		{						
			$this->setQuery("set names utf8");
			$this->query();		
			$sql = "Select * from vnf_testimonial";	
			$this->setQuery($sql);
			$value = $this->loadAllRow();
			return $value;
		}
		
		function UpdateTestimonial($activeYN, $id)
		{
			$this->setQuery("set names utf8");
			$this->query();
			$sql = "";
			$sql = "Update vnf_testimonial set `activeYN` =  '".$activeYN."' ";
			$sql .= " where testimonialID=".$id;		
			$this->setQuery($sql);
			$this->query();
		}
		
		function GetOneTestimonial($id)
		{
			$this->setQuery("set names utf8");
			$this->query();
			$sql = "Select * from vnf_testimonial where testimonialID =".$id."";
			$this->setQuery($sql);
			$row = $this->loadOneRow();
			return $row;
		}
		
		function DeleteTestimonial($id)
		{
			$this->setQuery("set names utf8");
			$this->query();
			$sql = "";
			$sql = "Delete from vnf_testimonial";
			$sql .= " where testimonialID=".$id;			
			
			$this->setQuery($sql);
			$this->query();
		}
	
		
	}
?>